package com.tuanzi.loan.web.lazy.member;

import com.tuanzi.loan.business.service.member.LoanMemberPriceService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.member.LoanMemberPriceRequest;
import com.tuanzi.loan.vo.response.member.LoanMemberPriceResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;


public class LoanMemberPriceLazyDataModel extends LazyDataSessionModel<LoanMemberPriceRequest, LoanMemberPriceResponse> {

    private static final long serialVersionUID = -4181037940399112360L;

    private LoanMemberPriceService loanMemberPriceService;

    public LoanMemberPriceLazyDataModel(LoanMemberPriceRequest loanMemberPriceRequest, CurrentUserBean session, LoanMemberPriceService loanMemberPriceService) {
        super(loanMemberPriceRequest, session);
        this.loanMemberPriceService = loanMemberPriceService;
    }

    @Override
    protected Page<LoanMemberPriceResponse> doLoad0(PageSearcher<LoanMemberPriceRequest> pageSearcher) {
        return loanMemberPriceService.list(pageSearcher);
    }
}
